<template>
  <view class="login-page">


    <view class="login-layout">
      <!-- 顶部返回 -->
      <view class="login-top">
        <view class="login-booth"></view>
        <view class="login-back">
          <text class="iconfont icon-weibiaoti--10" @click="closeMenu"></text>
        </view>
      </view>
      <view class="logo-content">
        <view class="logo-layout">
          <image src="/static/login.jpg" class="login-img"></image>
          <text class="telephone">135****8888</text>
          <!-- 描述 -->
          <text class="login-text">此顶级提供认证服务</text>
        </view>
      </view>

      <view class="login-button" @click="telephoneloginFn">本机号码登录</view>
      <view class="login-button other" @click="otherloginFn">其他方式登录</view>
      <view class="radio-box">
        <label class="radio"
          ><radio
            :checked="checked"
            @click="checked = !checked"
            activeBackgroundColor="#0077ff"
          />
          <text>我已同意并阅读</text>
          <text class="user-terms">《用户条款和相关服务协议》</text>
        </label>
      </view>

      <view class="login-bottom">
        <text class="logo">LOGO</text>
        <text class="logo-text">https://gitee.com/Subtop @次顶级</text>
      </view>
    </view>
  </view>
</template>

<script>
import { defineComponent, ref } from "vue";
import { useMixin } from "./mixins";
export default defineComponent({
  name: "login005",
  props: {},
  components: {},
  setup() {
    const mixin = useMixin();
    const checked = ref(false);
    const telephoneloginFn = () => {
      uni.showToast({
        title: "执行本机登录",
        icon: "seccess",
      });
    };
    const otherloginFn = () => {
      uni.showToast({
        title: "执行其他方式登录",
        icon: "seccess",
      });
      // 跳转页面
      uni.navigateTo({
        url: "/pages/login/login",
      });
    };
    const closeMenu = () => {
      // 提示
      uni.showToast({
        title: "执行返回",
        icon: "seccess",
      });
    };
    return {
      telephoneloginFn,
      checked,
      otherloginFn,
      closeMenu,
      ...mixin,
    };
  },
});
</script>

<style lang="less" scoped>
.login-page {
  width: 100%;
  height: 100vh;
  background: #ffffff;
  overflow: hidden;
}

.login-layout {
  .login-top {
    height: 160rpx;
    .login-booth {
      width: 100%;
      height: 80rpx;
    }
    .login-back {
      width: 100%;
      height: 80rpx;
      .icon-weibiaoti--10 {
        line-height: 80rpx;
        padding-left: 20rpx;
        font-size: 34rpx;
      }
    }
  }
  .logo-content {
    height: 500rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    .logo-layout {
      display: flex;
      flex-direction: column;
      align-items: center;
      .login-img {
        width: 150rpx;
        height: 150rpx;
        border-radius: 50%;
        border: 1rpx solid #ff7300;
      }
      .telephone {
        color: #000;
        font-size: 50rpx;
        margin-top: 30rpx;
      }
      .login-text {
        color: #999;
        font-size: 24rpx;
      }
    }
  }
  .login-button {
    width: 90%;
    margin: 0 auto;
    background: #ff7300;
    height: 90rpx;
    line-height: 90rpx;
    text-align: center;
    border-radius: 40rpx;
    color: #fff;
    font-size: 30rpx;
    transition: all 0.3s;
    &.other {
      background: #fff;
      color: #777;
      border: 1rpx solid #ddd;
      margin-top: 20rpx;
    }
  }

  /deep/ .uni-radio-input {
    width: 20rpx !important;
    height: 20rpx !important;
  }
  .radio-box {
    width: 100%;
    margin-top: 20rpx;
    padding: 0 40rpx;
    .radio {
      font-size: 22rpx;
      .user-terms {
        color: #0077ff;
      }
    }
  }

  .login-bottom {
    position: fixed;
    width: 100%;
    padding: 10rpx 40rpx;
    box-sizing: border-box;
    bottom: 10rpx;
    display: flex;
    justify-content: center;
    // 底部对齐
    align-items: center;
    .logo {
      font-size: 40rpx;
      color: #fa9600;
      font-weight: 700;
      margin-right: 20rpx;
    }
    .logo-text {
      font-size: 20rpx;
      color: #999;
    }
  }
}
</style>
